@name: yc-cron-input-number;

.@{name} {
  position: relative;
  display: inline-block;
  width: 180px;
  line-height: 38px;
  &__decrease, &__increase {
    position: absolute;
    z-index: 1;
    top: 1px;
    width: 40px;
    height: auto;
    text-align: center;
    background: #f5f7fa;
    color: #606266;
    cursor: pointer;
    font-size: 13px;
  }
  &__decrease {
    left: 1px;
    border-radius: 4px 0 0 4px;
    border-right: 1px solid #dcdfe6;
  }
  &__increase {
    right: 1px;
    border-radius: 0 4px 4px 0;
    border-left: 1px solid #dcdfe6;
  }
  &__input {
    -webkit-appearance: none;
    background-color: #fff;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    box-sizing: border-box;
    color: #606266;
    display: inline-block;
    font-size: inherit;
    height: 40px;
    line-height: 40px;
    outline: none;
    padding: 0 15px;
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }
  &__input {
    padding-left: 50px;
    padding-right: 50px;
    text-align: center;
  }
  &__text {
    display: none;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 15px;
    right: 50px;
    background-color: #fff;
    pointer-events: none;
    &.is-active {
      display: flex;
    }
  }
  &--small {
    width: 130px;
    line-height: 30px;
    .@{name} {
      &__decrease, &__increase {
        width: 32px;
        font-size: 13px;
      }
      &__input {
        height: 32px;
        line-height: 32px;
      }
    }
    &.is-controls-right {
      &[class*=small] {
        [class*=decrease], [class*=increase] {
          line-height: 15px;
        }
      }
    }
  }
  &.is-controls-right {
    .@{name} {
      &__decrease, &__increase {
        height: auto;
        line-height: 19px;
        [class*=el-icon] {
          transform: scale(.8);
        }
      }
      &__decrease {
        right: 1px;
        bottom: 1px;
        top: auto;
        left: auto;
        border-right: none;
        border-left: 1px solid #dcdfe6;
        border-radius: 0 0 4px 0;
      }
      &__increase {
        border-radius: 0 4px 0 0;
        border-bottom: 1px solid #dcdfe6;
      }
      &__input {
        padding-left: 15px;
        padding-right: 50px;
      }
    }
  }
}
